#!/opt/local/bin/perl
package Test::IRC;
use Data::Dumper;
sub get_heap {
	my $self = shift;
	return $self;
}
sub yield {
	my $self = shift;
	print "Test::IRC::yield : @_\n";
}
1;

################################################################################

package main;

use lib '.';
use strict;
use warnings;

use Command::Basic;
use Data::Dumper;
use YAML::Syck;

$| = 1;

my $config;
if (-f 'config.yaml') {
    $config = LoadFile('config.yaml');
}
else {
    print "Can't load config.yaml\n";
    exit;
}

my $irc = bless {}, 'Test::IRC';

my $cmd = Command::Basic->new(config=>$config);

warn "TEST 1";
$cmd->command($irc, 'yuni!host', ['#perl-kr-bot'], '!'.$_)
	foreach(qw/help j2k kick help dic map search lang twiter me2day/);

#warn "TEST 2";
#print "test.pl : ", Dumper($cmd);
